print("Hello World!")

fruits = ["apple","banana","cherry"]
fruits.append("orange")

print(fruits)
print(fruits[0:2])

for i in fruits:
    print(i)

##1、int
num = 12345
for i in str(num):
    print(i)

coordinates = (4,5,6)
for i in coordinates:
    print(i)

numbers = {100,101,102}
for num in numbers:
    print(num)


person = {"name":"zhangsan","age":18,"city":"Nanjing"}
## 1、遍历字典的键
for key in person:
    print(key)

## 2、遍历字典的值
for value in person.values():
    print(value)

## 3、遍历键值对
for k,v in person.items():
    print(f"key is {k}, value is {v}")